// CVisCommandLineInterface.h
// Developed by Yang Yu (yuy@janelia.hhmi.org), Sept 25, 2012
// 

#ifndef __CVISCOMMANDLINEINTERFACE_H__
#define __CVISCOMMANDLINEINTERFACE_H__

#include <string>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <vector>
#include <limits>

#include <cmath>
#include <ctime>

#include <iostream>
#include <fstream>
#include <sstream>

using namespace std;

#include "boost/filesystem/operations.hpp" // includes boost/filesystem/path.hpp
#include "boost/filesystem/fstream.hpp"    // ditto
#include "boost/filesystem/exception.hpp"
#include "boost/utility.hpp"

using namespace boost::filesystem;

//
#ifdef WIN32
#define OPTION_CHAR '/'
#else
#define OPTION_CHAR '-'
#endif


// check file format
bool check_fileformat(char* filename, char* extension);


// command line interface
class CVisCommandLineInterface
{
public: 
    
    CVisCommandLineInterface();
    ~CVisCommandLineInterface();  
    
public:
    
	vector<char *> inputsList;
    vector<char *> parametersList;
    vector<char *> outputsList;
    
    char* funcname;
    
};


// command line parser
class CVisCommandLineParser
{
public:
	
	CVisCommandLineParser();
    ~CVisCommandLineParser();
	
public:
	
	bool check_filename(char* filename);
	int parse(int argc, char *argv[], void (*help)(), void (*version)());
	int error( void (*help)() );
    
public:
    
    CVisCommandLineInterface cli;
	
};

#endif //__CVISCOMMANDLINEINTERFACE_H__
